package spring.study.annotation.cofig;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import spring.study.annotation.bean.Person;

/**
 * @author study
 * @version 1.0
 * @date 2020/6/18 22:07
 */
@Configuration
@ComponentScan(value = "spring.study.annotation")
public class MainConfig {
    /**
     * 注册一个 bean,类型为返回值 的类型，ID默认使用方法名
     */
    @Bean
    public Person person01() {
        return new Person("lisi", 20);
    }
}
